home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2001 May / SGI Freeware 2001 May - Disc 3.iso / dist / fw_bind.idb / usr / freeware / include / bind / irp.h.z / irp.h
Encoding:
C/C++ Source or Header  |  2001-04-12  |  3.3 KB  |  100 lines

  1. /*
  2.  * Copyright (c) 1999 by Internet Software Consortium.
  3.  *
  4.  * Permission to use, copy, modify, and distribute this software for any
  5.  * purpose with or without fee is hereby granted, provided that the above
  6.  * copyright notice and this permission notice appear in all copies.
  7.  *
  8.  * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
  9.  * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
  10.  * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
  11.  * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  12.  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  13.  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  14.  * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  15.  * SOFTWARE.
  16.  */
  17.  
  18. /*
  19.  * $Id: irp.h,v 8.1 1999/01/18 07:46:46 vixie Exp $
  20.  */
  21.  
  22. #ifndef _IRP_H_INCLUDED
  23. #define _IRP_H_INCLUDED
  24.  
  25. #define IRPD_TIMEOUT 30            /* seconds */
  26. #define IRPD_MAXSESS 50            /* number of simultaneous sessions. */
  27. #define IRPD_PORT 6660            /* 10 times the number of the beast. */
  28. #define IRPD_PATH "/var/run/irpd"    /* af_unix socket path */
  29.  
  30. /* If sets the environment variable IRPDSERVER to an IP address
  31.    (e.g. "192.5.5.1"), then that's the host the client expects irpd to be
  32.    running on. */
  33. #define IRPD_HOST_ENV "IRPDSERVER"
  34.  
  35. /* Protocol response codes.  */
  36. #define IRPD_WELCOME_CODE 200
  37. #define IRPD_NOT_WELCOME_CODE 500
  38.  
  39. #define IRPD_GETHOST_ERROR 510
  40. #define IRPD_GETHOST_NONE 210
  41. #define IRPD_GETHOST_OK 211
  42. #define IRPD_GETHOST_SETOK 212
  43.  
  44. #define IRPD_GETNET_ERROR 520
  45. #define IRPD_GETNET_NONE 220
  46. #define IRPD_GETNET_OK 221
  47. #define IRPD_GETNET_SETOK 222
  48.  
  49. #define IRPD_GETUSER_ERROR 530
  50. #define IRPD_GETUSER_NONE 230
  51. #define IRPD_GETUSER_OK 231
  52. #define IRPD_GETUSER_SETOK 232
  53.  
  54. #define IRPD_GETGROUP_ERROR 540
  55. #define IRPD_GETGROUP_NONE 240
  56. #define IRPD_GETGROUP_OK 241
  57. #define IRPD_GETGROUP_SETOK 242
  58.  
  59. #define IRPD_GETSERVICE_ERROR 550
  60. #define IRPD_GETSERVICE_NONE 250
  61. #define IRPD_GETSERVICE_OK 251
  62. #define IRPD_GETSERVICE_SETOK 252
  63.  
  64. #define IRPD_GETPROTO_ERROR 560
  65. #define IRPD_GETPROTO_NONE 260
  66. #define IRPD_GETPROTO_OK 261
  67. #define IRPD_GETPROTO_SETOK 262
  68.  
  69. #define IRPD_GETNETGR_ERROR 570
  70. #define IRPD_GETNETGR_NONE 270
  71. #define IRPD_GETNETGR_OK 271
  72. #define IRPD_GETNETGR_NOMORE 272
  73. #define IRPD_GETNETGR_MATCHES 273
  74. #define IRPD_GETNETGR_NOMATCH 274
  75. #define IRPD_GETNETGR_SETOK 275
  76. #define IRPD_GETNETGR_SETERR 276
  77.  
  78. #define    irs_irp_read_body __irs_irp_read_body
  79. #define irs_irp_read_response __irs_irp_read_response
  80. #define irs_irp_disconnect __irs_irp_disconnect
  81. #define irs_irp_connect __irs_irp_connect
  82. #define irs_irp_connection_setup __irs_irp_connection_setup
  83. #define irs_irp_send_command __irs_irp_send_command
  84.  
  85. struct irp_p;
  86.  
  87. char   *irs_irp_read_body(struct irp_p *pvt, size_t *size);
  88. int    irs_irp_read_response(struct irp_p *pvt, char *text, size_t len);
  89. void    irs_irp_disconnect(struct irp_p *pvt);
  90. int    irs_irp_connect(struct irp_p *pvt);
  91. int    irs_irp_is_connected(struct irp_p *pvt);
  92. int    irs_irp_connection_setup(struct irp_p *cxndata, int *warned);
  93. int    irs_irp_send_command(struct irp_p *pvt, const char *fmt, ...);
  94. int    irs_irp_get_full_response(struct irp_p *pvt, int *code, char *text,
  95.                   size_t textlen, char **body,
  96.                   size_t *bodylen);
  97. int    irs_irp_read_line(struct irp_p *pvt, char *buffer, int len);
  98.  
  99. #endif
  100.